//
//  DailyAudioViewController.m
//  艾听歌
//
//  Created by dllo on 16/5/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "DailyAudioViewController.h"
#import "MyScrollView.h"
#import "AFNetworking.h"
#import "FansTableViewCell.h"
#import "RecommendTableViewCell.h"
#import "AsiaTableViewCell.h"
#import "MusicRecommendCell.h"
#import "NewTableViewCell.h"
#import "TopListTableViewCell.h"
#import "PrefectureTableViewCell.h"
#import "MusicPlyController.h"
#import "MusicModel.h"
#import "NewViewController.h"
#import "MusicSmallModel.h"
#import "HotViewController.h"
#import "PreDetailVC.h"
#import "ListViewController.h"
#import "SuperViewController.h"
#import "PrefectureViewController.h"
#import "PhotoDetailTwoViewController.h"

#import "PhotoDetailViewController.h"
#import "AsiaViewController.h"
#import "SearchViewController.h"

#import "NewViewController.h"

#define CELL @"buttonCELL"
#define RecommmendCell @"cell"
#define MusicCell @"musicCell"
#define NewCell @"newcell"
#define TOPCELL @"TOPCELL"
#define PreCELL @"PRECELL"
#define AsiaCELL @"asiacell"


@interface DailyAudioViewController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray *Array;
@property (nonatomic, strong) NSMutableArray *allArray; // 全部数据
@property (nonatomic, strong) NSMutableArray *secondAllArray; // tableView中的数据
@property (nonatomic, strong) UILabel *headerLabel;
@property (nonatomic, strong) NSArray *SectionTitleArray;
@property (nonatomic, strong) UIButton *headerImage;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) NSMutableArray *musicArr; // 歌曲推荐
@property (nonatomic, strong) NSMutableArray *NewsongArray;// 新歌新碟
@property (nonatomic, strong) NSMutableArray *HotArray;// 热门歌单
@property (nonatomic, strong) NSMutableArray *RecommendArray;// 推荐榜单
@property (nonatomic, strong) NSMutableArray *starArray;// 独家艺人
@property (nonatomic, strong) NSMutableArray *PrefectureArray;// 独家专区
@property (nonatomic, strong) NSMutableArray *AsiaArray;// 亚洲新歌榜



@end

@implementation DailyAudioViewController

-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
    [self setAutomaticallyAdjustsScrollViewInsets:NO];
    // 设置导航半透明
    self.navigationController.navigationBar.translucent = NO;


}


- (void)viewDidLoad {
    [super viewDidLoad];
    self.Array = [NSMutableArray array];
    self.musicArr = [NSMutableArray array];
    self.NewsongArray = [NSMutableArray array];
    self.HotArray = [NSMutableArray array];
    self.RecommendArray = [NSMutableArray array];
    self.starArray = [NSMutableArray array];
    self.PrefectureArray = [NSMutableArray array];
    self.AsiaArray = [NSMutableArray array];
    self.allArray = [NSMutableArray array];
    self.secondAllArray = [NSMutableArray array];
    self.SectionTitleArray = [NSMutableArray array];
    
    self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
        //导航栏上的标题
    UILabel *title = [[UILabel alloc] initWithFrame:CGRectMake(self.view.center.x - 30, 10, 60, 30)];
    title.text = @"天天视听";
    title.textColor = [UIColor whiteColor];
    title.textAlignment = NSTextAlignmentCenter;
    self.navigationItem.titleView = title;
//    [self afnGetData];
    [self getAFNData];
    // 适应导航栏 重设tableview的坐标
    [self setAutomaticallyAdjustsScrollViewInsets:NO];
    self.SectionTitleArray = @[@"歌曲推荐", @"新歌新碟", @"热门歌单", @"推荐榜单", @"独家艺人", @"独家专区", @"亚洲新歌榜"];
    
    // 设置导航栏按钮
    UIBarButtonItem *SearchbarLeft = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"搜索"] style:UIBarButtonItemStylePlain target:self action:@selector(SearchbarLeft:)];
    
//    UIBarButtonItem *MusicRight = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"音乐"] style:UIBarButtonItemStylePlain target:self action:@selector(MusicRight:)];
    self.navigationItem.leftBarButtonItem = SearchbarLeft;
//    self.navigationItem.rightBarButtonItem = MusicRight;
//    
    
     self.navigationController.navigationBar.dk_barTintColorPicker = DKColorPickerWithRGB(0xFF6EB4,0x9C9C9C);
    
    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT - 64 - 49) style:UITableViewStylePlain];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    [self.view addSubview:self.tableView];
    
    
    [self.tableView registerClass:[FansTableViewCell class] forCellReuseIdentifier:CELL];
    [self.tableView registerClass:[RecommendTableViewCell class] forCellReuseIdentifier:RecommmendCell];
    [self.tableView registerClass:[MusicRecommendCell class] forCellReuseIdentifier:MusicCell];
    [self.tableView registerClass:[NewTableViewCell class] forCellReuseIdentifier:NewCell];

    [self.tableView registerClass:[PrefectureTableViewCell class] forCellReuseIdentifier:PreCELL];
    [self.tableView registerClass:[AsiaTableViewCell class] forCellReuseIdentifier:AsiaCELL];
   
    
    
    [self setAutomaticallyAdjustsScrollViewInsets:NO];
    // 设置导航不透明
    self.navigationController.navigationBar.translucent = NO;

    
}

- (void)toNewViewController:(NSNotification *)noti
{
    NewViewController *NewVC = [[NewViewController alloc] init];
    NewVC.ViewController = [noti object];
    [self.navigationController pushViewController:NewVC animated:YES];
    
}
- (void)getAFNData
{
    NSString *str = [NSString stringWithFormat:@"http:api.dongting.com/frontpage/frontpage?location=0&version=1463057210320&app=ttpod&v=v9.0.1.2016050614&user_id=0&mid=iPhone72C2&f=f320&s=s310&imsi=&hid=&splus=9.3.1&active=1&net=2&openudid=5e6106cc8d5bcf35f60a2997c79a00bb5a7c631f&idfa=ABDADD65-0877-4840-B14F-DFC8D1114AB0&utdid=VzR0dwnWYs8DANbYJ8SsFzOU&alf=(null)&bundle_id=com.ttpod.music&latitude=-1&longtitude=-1&access_token=(null)&vc=9000100"];
    

    [WTAFNetWorking WT_GetWithURL:str Parameter:nil success:^(id result) {
        NSDictionary *bigDic = [result objectForKey:@"data"];
        for (NSDictionary *smallDic in bigDic) {
            MusicModel *mModel = [[MusicModel alloc]init];
            [mModel setValuesForKeysWithDictionary:smallDic];
            [self.allArray addObject:mModel];
        }
        //        NSLog(@"%@",self.allArray);
        
        NSMutableArray *newArr = [NSMutableArray arrayWithArray:self.allArray];
        [newArr removeObjectAtIndex:0];
        
        self.secondAllArray = [NSMutableArray arrayWithArray:newArr];
        
        MusicModel *bigModel0 = [self.allArray objectAtIndex:0];
        for (MusicSmallModel *smallMSM in bigModel0.data) {
            [self.Array addObject:smallMSM];
        }
        
        MusicModel *bigModel2 = [self.allArray  objectAtIndex:2];
        for (MusicSmallModel *smallMSM in bigModel2.data) {
            [self.musicArr addObject:smallMSM];
        }
        
        
        MusicModel *bigModel3 = [self.allArray  objectAtIndex:3];
        for (MusicSmallModel *smallMSM in bigModel3.data) {
            [self.NewsongArray addObject:smallMSM];
        }
        
        MusicModel *bigModel4 = [self.allArray  objectAtIndex:4];
        for (MusicSmallModel *smallMSM in bigModel4.data) {
            [self.HotArray addObject:smallMSM];
        }
        
        
        MusicModel *bigModel5 = [self.allArray  objectAtIndex:5];
        for (MusicSmallModel *smallMSM in bigModel5.data) {
            [self.RecommendArray addObject:smallMSM];
        }
        
        MusicModel *bigModel6 = [self.allArray  objectAtIndex:6];
        for (MusicSmallModel *smallMSM in bigModel6.data) {
            [self.starArray addObject:smallMSM];
        }
        
        MusicModel *bigModel7 = [self.allArray  objectAtIndex:7];
        for (MusicSmallModel *smallMSM in bigModel7.data) {
            [self.PrefectureArray addObject:smallMSM];
        }
        
        MusicModel *bigModel8 = [self.allArray  objectAtIndex:8];
        for (MusicSmallModel *smallMSM in bigModel8.data) {
            [self.AsiaArray addObject:smallMSM];
        }
        
        
        
        [self createScrollView];
        
        [self.tableView reloadData];

        
    } error:^(NSError *error) {
        
        
    }];
}
- (void)afnGetData
{
    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    NSString *str = [NSString stringWithFormat:@"http:api.dongting.com/frontpage/frontpage?location=0&version=1463057210320&app=ttpod&v=v9.0.1.2016050614&user_id=0&mid=iPhone72C2&f=f320&s=s310&imsi=&hid=&splus=9.3.1&active=1&net=2&openudid=5e6106cc8d5bcf35f60a2997c79a00bb5a7c631f&idfa=ABDADD65-0877-4840-B14F-DFC8D1114AB0&utdid=VzR0dwnWYs8DANbYJ8SsFzOU&alf=(null)&bundle_id=com.ttpod.music&latitude=-1&longtitude=-1&access_token=(null)&vc=9000100"];
    
    
    [manager GET:str parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) {
        
        
    } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
//        NSLog(@"%@", responseObject);
        NSDictionary *bigDic = [responseObject objectForKey:@"data"];
        for (NSDictionary *smallDic in bigDic) {
            MusicModel *mModel = [[MusicModel alloc]init];
            [mModel setValuesForKeysWithDictionary:smallDic];
            [self.allArray addObject:mModel];
        }
//        NSLog(@"%@",self.allArray);
        
        NSMutableArray *newArr = [NSMutableArray arrayWithArray:self.allArray];
        [newArr removeObjectAtIndex:0];
    
        self.secondAllArray = [NSMutableArray arrayWithArray:newArr];
        
        MusicModel *bigModel0 = [self.allArray objectAtIndex:0];
        for (MusicSmallModel *smallMSM in bigModel0.data) {
            [self.Array addObject:smallMSM];
        }
        
        MusicModel *bigModel2 = [self.allArray  objectAtIndex:2];
        for (MusicSmallModel *smallMSM in bigModel2.data) {
            [self.musicArr addObject:smallMSM];
        }
        
        
        MusicModel *bigModel3 = [self.allArray  objectAtIndex:3];
        for (MusicSmallModel *smallMSM in bigModel3.data) {
            [self.NewsongArray addObject:smallMSM];
        }
        
        MusicModel *bigModel4 = [self.allArray  objectAtIndex:4];
        for (MusicSmallModel *smallMSM in bigModel4.data) {
            [self.HotArray addObject:smallMSM];
        }

        
        MusicModel *bigModel5 = [self.allArray  objectAtIndex:5];
        for (MusicSmallModel *smallMSM in bigModel5.data) {
            [self.RecommendArray addObject:smallMSM];
        }
        
        MusicModel *bigModel6 = [self.allArray  objectAtIndex:6];
        for (MusicSmallModel *smallMSM in bigModel6.data) {
            [self.starArray addObject:smallMSM];
        }
        
        MusicModel *bigModel7 = [self.allArray  objectAtIndex:7];
        for (MusicSmallModel *smallMSM in bigModel7.data) {
            [self.PrefectureArray addObject:smallMSM];
        }
        
        MusicModel *bigModel8 = [self.allArray  objectAtIndex:8];
        for (MusicSmallModel *smallMSM in bigModel8.data) {
            [self.AsiaArray addObject:smallMSM];
        }

        
               
        [self createScrollView];
        
        [self.tableView reloadData];
        
        
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        
        
    }];
    
}
// 取消分区头的悬停效果的方法
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    
    if (scrollView == self.tableView)
    {
        CGFloat sectionHeaderHeight = 64; //sectionHeaderHeight
        if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) {
            scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0);
        } else if (scrollView.contentOffset.y>=sectionHeaderHeight) {
            scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0);
        }
    }
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    
    return self.secondAllArray.count ;
    
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    
    if (indexPath.section == 0) {
        FansTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CELL];

        cell.toHotVCBlock = ^(){
            HotViewController *hotVC = [[HotViewController alloc] init];
            [self.navigationController pushViewController:hotVC animated:YES];
            };
        cell.toListBlock = ^(){
            ListViewController * listVC = [[ListViewController alloc] init];
            [self.navigationController pushViewController:listVC animated:YES];
        };
        cell.toStarBlock = ^(){
            SuperViewController *superVC = [[SuperViewController alloc] init];
            [self.navigationController pushViewController:superVC animated:YES];
        };
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        
        return cell;
    }
    else if (indexPath.section == 1){
        
        MusicRecommendCell *cell = [tableView dequeueReusableCellWithIdentifier:MusicCell forIndexPath:indexPath];

        MusicModel *model = [self.allArray objectAtIndex:2];
        cell.NewMusicModel = model;
        

        
        return cell;
    }
    else if (indexPath.section == 2 || indexPath.section == 4 || indexPath.section == 5){
        
        NewTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NewCell forIndexPath:indexPath];

        if (indexPath.section == 2) {
        MusicModel *model = [self.allArray objectAtIndex:3];
        cell.NewMusicModel = model;

        }
        if (indexPath.section == 4) {
            MusicModel *model = [self.allArray objectAtIndex:5];
            cell.NewMusicModel = model;
            
        }
        
        if (indexPath.section == 5) {
            MusicModel *model = [self.allArray objectAtIndex:6];
            cell.NewMusicModel = model;
            
        }

        return cell;
    }else if (indexPath.section == 3){
        RecommendTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:RecommmendCell forIndexPath:indexPath];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
//        cell.dk_backgroundColorPicker = DKColorPickerWithRGB(0xffffff, 0x9c9c9c);
        
        MusicModel *model = [self.allArray objectAtIndex:4];
        cell.NewCellModel = model;

        return cell;

    }
    if (indexPath.section == 6) {
        PrefectureTableViewCell *PREcell = [tableView dequeueReusableCellWithIdentifier:PreCELL forIndexPath:indexPath];
        PREcell.NewMusicModel =  [self.PrefectureArray objectAtIndex:indexPath.row];
        PREcell.dk_backgroundColorPicker = DKColorPickerWithRGB(0xffffff, 0x9c9c9c);
        
        PREcell.selectionStyle = UITableViewCellSelectionStyleNone;

        return PREcell;
    }
    
    
    AsiaTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:AsiaCELL forIndexPath:indexPath];
    cell.dk_backgroundColorPicker = DKColorPickerWithRGB(0xffffff, 0x9c9c9c);
    cell.NewMusicModel = [self.AsiaArray objectAtIndex:indexPath.row];
    
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return cell;
    
    
}

//分区头
-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{
    if (section == 0) {
        
        return @"";
 
    }if (section == 1) {
        
        MusicModel *model = [self.allArray objectAtIndex:2];
        return model.name;

    }if (section == 2) {
        MusicModel *model = [self.allArray objectAtIndex:3];
        return model.name;

    }if (section == 3) {
        MusicModel *model = [self.allArray objectAtIndex:4];
        return model.name;

    }if (section == 4) {
        MusicModel *model = [self.allArray objectAtIndex:5];
        return model.name;

    }if (section == 5) {
        MusicModel *model = [self.allArray objectAtIndex:6];
        return model.name;
//        return @"独家艺人";
    }
    if (section == 6) {
        MusicModel *model = [self.allArray objectAtIndex:7];
        return model.name;
//        return @"独家专区";
    }
    MusicModel *model = [self.allArray objectAtIndex:8];
    return model.name;
//    return @"亚洲新歌榜";


}


-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == 3) {
        
        return 300;
        
    } else if (indexPath.section == 2 || indexPath.section == 4 || indexPath.section == 5) {
        return 150;
    } else if (indexPath.section == 1){
        
        return 120;
    }else{
        return 80;
    }
    
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    
    UIView *MyView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 40)];
    MyView.dk_backgroundColorPicker = DKColorPickerWithRGB(0xffffff, 0x9c9c9c);
    self.headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(270, -5, self.view.frame.size.width, 40)];
    self.headerLabel.textColor = [UIColor blackColor];
    self.headerLabel.font = [UIFont systemFontOfSize:13];
    
    if (section == 7 || section == 1) {
        self.headerLabel.text = nil;
    }else{
        self.headerLabel.text = @"更多";
        [MyView addSubview:self.headerLabel];
    }
    
    
    self.headerImage = [UIButton buttonWithType:UIButtonTypeCustom];
    self.headerImage.frame = CGRectMake(290, 4, self.view.frame.size.width - 300, 22);
    [self.headerImage addTarget:self action:@selector(MoreAction:) forControlEvents:UIControlEventTouchUpInside];
    
    if (section == 1 || section == 7) {
        self.headerImage = nil;
    }else {
        [self.headerImage setBackgroundImage:[UIImage imageNamed:@"下一个"] forState:UIControlStateNormal];

        
        self.headerImage.tag = 10000 + section;
        [MyView addSubview:self.headerImage];
    }
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(160, -5, self.view.frame.size.width, 40)];
    if (section >= 1 && section <= 7) {
        
        self.titleLabel.text = [self.SectionTitleArray objectAtIndex:section - 1];
    } else{
        self.titleLabel.text = nil;
    }
    self.titleLabel.textColor = [UIColor blackColor];
    [MyView addSubview:self.titleLabel];
    
    
    return MyView;
}
// 按钮的点击方法(更多)
- (void)MoreAction:(UIButton *)button
{
    if (button.tag == 10002) {
        NewViewController *newVC = [[NewViewController alloc] init];
        [self.navigationController pushViewController:newVC animated:YES];
    }
    if (button.tag == 10003) {
        HotViewController *hotVC = [[HotViewController alloc] init];
        [self.navigationController pushViewController:hotVC animated:YES];
    }
    if (button.tag == 10004) {
        ListViewController * listVC = [[ListViewController alloc] init];
        [self.navigationController pushViewController:listVC animated:YES];
    }if (button.tag == 10005) {
        SuperViewController *superVC = [[SuperViewController alloc] init];
        [self.navigationController pushViewController:superVC animated:YES];
    }
    if (button.tag == 10006) {
        PrefectureViewController *prefectureVC = [[PrefectureViewController alloc] init];
        [self.navigationController pushViewController:prefectureVC animated:YES];
    }
    
    
}
// row的个数
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if (section == 6) {
        
      
        return self.PrefectureArray.count;
        
    } else {
        
        return 1;

    }
}
// 搜索的点击方法
- (void)SearchbarLeft:(UIBarButtonItem *)search
{
    SearchViewController *searchVC = [[SearchViewController alloc] init];
    [self.navigationController pushViewController:searchVC animated:YES];
    
}
//// 音乐的点击方法
//- (void)MusicRight:(UIBarButtonItem *)music
//{
//    MusicPlyController *musicVC = [[MusicPlyController alloc] init];
//    
//    [self presentViewController:musicVC animated:YES completion:^{
//        
//        
//    }];
//    
//}

- (void)createScrollView
{
    
    NSMutableArray *picArray = [NSMutableArray array];
    for (MusicSmallModel *model in self.Array) {
        [picArray addObject:model.picUrl];
    }
    
    MyScrollView *myScrollView = [[MyScrollView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 180)];
    self.tableView.tableHeaderView = myScrollView;
    [myScrollView setImages:picArray];
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(picImageAction)];
    
    __block DailyAudioViewController *root = self;
    myScrollView.toPhotoDetail = ^(NSInteger page){
        
        MusicSmallModel *smallModel = [self.Array objectAtIndex:page - 1];
        NSDictionary *action = smallModel.action;
        NSInteger type = [[action objectForKey:@"type"] integerValue];
        if (type == 1) {
            
        PhotoDetailViewController *PDVC = [[PhotoDetailViewController alloc]init];
        PDVC.detailsModel = smallModel;
        [root.navigationController pushViewController:PDVC animated:YES];
            
        }else{
            
        PhotoDetailTwoViewController *PDTVC = [[PhotoDetailTwoViewController alloc]init];
            PDTVC.detailsModel = smallModel;
        [root.navigationController pushViewController:PDTVC animated:YES];
            
        }
        
        
        
        
    };
    
    
    [myScrollView addGestureRecognizer:tap];
    
}
- (void)picImageAction
{
    
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    if ([indexPath section] == 7) {
        AsiaViewController *asiaVC =[[AsiaViewController alloc] init];
        
        MusicSmallModel *model = self.AsiaArray[indexPath.row];
        asiaVC.string = [model.action objectForKey:@"value"];
                
        [self.navigationController pushViewController:asiaVC animated:YES];
    } else if ([indexPath section] == 6) {
               
    PreDetailVC *predetailVC = [[PreDetailVC alloc] init];
        MusicSmallModel *model = self.PrefectureArray[indexPath.row];
        predetailVC.actionDic  = model.action;

        
    
    
    
    
    [self.navigationController pushViewController:predetailVC animated:YES];
    }
}
// 视图将要出现的时候 tabBar不隐藏
- (void)viewDidAppear:(BOOL)animated{
    [super viewDidAppear:animated];
    self.tabBarController.tabBar.hidden = NO;
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
